//
//  UIView+height.m
//  UI - 练习敲
//
//  Created by hesiyao on 16/1/19.
//  Copyright © 2016年 www.lanou3g.com蓝鸥科技. All rights reserved.
//

#import "UIView+height.h"

@implementation UIView (height)

/// 自适应高度方法
+ (CGFloat)heightWith:(NSString *)text size:(CGSize)Size
{
    NSDictionary *dic = @{NSFontAttributeName:[UIFont systemFontOfSize:17]};
    CGSize size = Size;
    CGRect rect = [text boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    return rect.size.height;
}

@end
